package rad.framework.mda.generator.template.conf;

import rad.framework.mda.generator.util.*;

public class LoginConfig
{
  protected static String nl;
  public static synchronized LoginConfig create(String lineSeparator)
  {
    nl = lineSeparator;
    LoginConfig result = new LoginConfig();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "<?xml version='1.0'?>" + NL + "<!DOCTYPE policy PUBLIC" + NL + "      \"-//JBoss//DTD JBOSS Security Config 3.0//EN\"" + NL + "      \"http://www.jboss.org/j2ee/dtd/security_config.dtd\">" + NL + "<policy>" + NL + "   <!-- For the JCR CMS -->" + NL + "   <application-policy name=\"cms\">" + NL + "      <authentication>" + NL + "         <login-module code=\"org.apache.jackrabbit.core.security.SimpleLoginModule\" flag=\"required\"/>" + NL + "      </authentication>" + NL + "   </application-policy>" + NL + "   " + NL + "   <application-policy name=\"portal\">" + NL + "      <authentication>" + NL + "         <login-module code=\"org.jboss.portal.core.security.jaas.ModelLoginModule\" flag=\"required\">" + NL + "            <module-option name=\"unauthenticatedIdentity\">guest</module-option>" + NL + "            <module-option name=\"hashAlgorithm\">MD5</module-option>" + NL + "            <module-option name=\"hashEncoding\">HEX</module-option>" + NL + "            <module-option name=\"userModuleJNDIName\">java:/portal/UserModule</module-option>" + NL + "            <module-option name=\"additionalRole\">Authenticated</module-option>" + NL + "            <module-option name=\"password-stacking\">useFirstPass</module-option>" + NL + "         </login-module>" + NL + "      </authentication>" + NL + "   </application-policy>" + NL + "</policy>";
  protected final String TEXT_2 = NL;

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    

    org.eclipse.uml2.uml.Model uml2Model = (org.eclipse.uml2.uml.Model) argument;
    stringBuffer.append(TEXT_1);
    stringBuffer.append(TEXT_2);
    return stringBuffer.toString();
  }
}
